<?php

class Controller extends Smarty
{
    public function __construct()
    {
        // 初始化smarty
        // 配置文件路径
        $this->setTemplateDir('./views')
            ->setCompileDir('./runtime/views_c')
            ->setConfigDir('./configs')
            ->setCacheDir('./runtime/caches');

        // 配置smarty定界符
        $this->left_delimiter = '<{';
        $this->right_delimiter = '}>';


        // 缓存
        $this->caching = false; // 关闭缓存
        $this->cache_lifetime = 60; // 缓存周期
    }

    public function __call($fun, $param)
    {
        header("HTTP/1.0 404 not found");
        echo '<h1>404 NOT FOUND123</h1>';
        die;
    }
}